using System;
using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class RectangleType
    {

        private GTame.ReportParser.ActionType _Action;
        private string _Bookmark;
        private GTame.ReportParser.CustomPropertiesType _CustomProperties;
        private string _DataElementName;
        private Rdl.RectangleTypeDataElementOutput _DataElementOutput;
        private string _Height;
        private string _Label;
        private string _Left;
        private string _LinkToChild;
        private System.Nullable<bool> _PageBreakAtEnd;
        private System.Nullable<bool> _PageBreakAtStart;
        private string _RepeatWith;
        private GTame.ReportParser.ReportItemsTypeComposite _ReportItems;
        private GTame.ReportParser.StyleType _Style;
        private string _ToolTip;
        private string _Top;
        private GTame.ReportParser.VisibilityType _Visibility;
        private string _Width;
        private System.Nullable<uint> _ZIndex;
        private string nameField;

        public GTame.ReportParser.ActionType Action
        {
            get
            {
                if (_Action == null)
                    _Action = new GTame.ReportParser.ActionType();
                return _Action;
            }
            set
            {
                _Action = value;
            }
        }

        public string Bookmark
        {
            get
            {
                return _Bookmark;
            }
            set
            {
                _Bookmark = value;
            }
        }

        public GTame.ReportParser.CustomPropertiesType CustomProperties
        {
            get
            {
                if (_CustomProperties == null)
                    _CustomProperties = new GTame.ReportParser.CustomPropertiesType();
                return _CustomProperties;
            }
            set
            {
                _CustomProperties = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return _DataElementName;
            }
            set
            {
                _DataElementName = value;
            }
        }

        public Rdl.RectangleTypeDataElementOutput DataElementOutput
        {
            get
            {
                return _DataElementOutput;
            }
            set
            {
                _DataElementOutput = value;
            }
        }

        public string Height
        {
            get
            {
                return _Height;
            }
            set
            {
                _Height = value;
            }
        }

        public string Label
        {
            get
            {
                return _Label;
            }
            set
            {
                _Label = value;
            }
        }

        public string Left
        {
            get
            {
                return _Left;
            }
            set
            {
                _Left = value;
            }
        }

        public string LinkToChild
        {
            get
            {
                return _LinkToChild;
            }
            set
            {
                _LinkToChild = value;
            }
        }

        public string Name
        {
            get
            {
                return nameField;
            }
            set
            {
                nameField = value;
            }
        }

        public System.Nullable<bool> PageBreakAtEnd
        {
            get
            {
                return _PageBreakAtEnd;
            }
            set
            {
                _PageBreakAtEnd = value;
            }
        }

        public System.Nullable<bool> PageBreakAtStart
        {
            get
            {
                return _PageBreakAtStart;
            }
            set
            {
                _PageBreakAtStart = value;
            }
        }

        public string RepeatWith
        {
            get
            {
                return _RepeatWith;
            }
            set
            {
                _RepeatWith = value;
            }
        }

        public GTame.ReportParser.ReportItemsTypeComposite ReportItems
        {
            get
            {
                if (_ReportItems == null)
                    _ReportItems = new GTame.ReportParser.ReportItemsTypeComposite();
                return _ReportItems;
            }
            set
            {
                _ReportItems = value;
            }
        }

        public GTame.ReportParser.StyleType Style
        {
            get
            {
                if (_Style == null)
                    _Style = new GTame.ReportParser.StyleType();
                return _Style;
            }
            set
            {
                _Style = value;
            }
        }

        public string ToolTip
        {
            get
            {
                return _ToolTip;
            }
            set
            {
                _ToolTip = value;
            }
        }

        public string Top
        {
            get
            {
                return _Top;
            }
            set
            {
                _Top = value;
            }
        }

        public GTame.ReportParser.VisibilityType Visibility
        {
            get
            {
                if (_Visibility == null)
                    _Visibility = new GTame.ReportParser.VisibilityType();
                return _Visibility;
            }
            set
            {
                _Visibility = value;
            }
        }

        public string Width
        {
            get
            {
                return _Width;
            }
            set
            {
                _Width = value;
            }
        }

        public System.Nullable<uint> ZIndex
        {
            get
            {
                return _ZIndex;
            }
            set
            {
                _ZIndex = value;
            }
        }

        public RectangleType()
        {
            _PageBreakAtEnd = new System.Nullable<bool>[]();
            _PageBreakAtStart = new System.Nullable<bool>[]();
            _ZIndex = new System.Nullable<uint>[]();
        }

        public Rdl.RectangleType Write()
        {
            Rdl.RectangleType rectangleType = new Rdl.RectangleType();
            System.Collections.ArrayList arrayList1 = new System.Collections.ArrayList();
            System.Collections.ArrayList arrayList2 = new System.Collections.ArrayList();
            rectangleType.Name = nameField;
            if (_Action != null)
            {
                arrayList1.Add(_Action.Write());
                arrayList2.Add(1);
            }
            if (_Bookmark != null)
            {
                arrayList1.Add(_Bookmark);
                arrayList2.Add(2);
            }
            if (_CustomProperties != null)
            {
                arrayList1.Add(_CustomProperties.Write());
                arrayList2.Add(3);
            }
            if (_DataElementName != null)
            {
                arrayList1.Add(_DataElementName);
                arrayList2.Add(4);
            }
            arrayList1.Add(_DataElementOutput);
            arrayList2.Add(5);
            if (_Height != null)
            {
                arrayList1.Add(_Height);
                arrayList2.Add(6);
            }
            if (_Label != null)
            {
                arrayList1.Add(_Label);
                arrayList2.Add(7);
            }
            if (_Left != null)
            {
                arrayList1.Add(_Left);
                arrayList2.Add(8);
            }
            if (_LinkToChild != null)
            {
                arrayList1.Add(_LinkToChild);
                arrayList2.Add(9);
            }
            if (_PageBreakAtEnd.get_HasValue())
            {
                arrayList1.Add(_PageBreakAtEnd);
                arrayList2.Add(10);
            }
            if (_PageBreakAtStart.get_HasValue())
            {
                arrayList1.Add(_PageBreakAtStart);
                arrayList2.Add(11);
            }
            if (_RepeatWith != null)
            {
                arrayList1.Add(_RepeatWith);
                arrayList2.Add(12);
            }
            if (_ReportItems != null)
            {
                arrayList1.Add(_ReportItems.Write());
                arrayList2.Add(13);
            }
            if (_Style != null)
            {
                arrayList1.Add(_Style.Write());
                arrayList2.Add(14);
            }
            if (_ToolTip != null)
            {
                arrayList1.Add(_ToolTip);
                arrayList2.Add(15);
            }
            if (_Top != null)
            {
                arrayList1.Add(_Top);
                arrayList2.Add(16);
            }
            if (_Visibility != null)
            {
                arrayList1.Add(_Visibility.Write());
                arrayList2.Add(17);
            }
            if (_Width != null)
            {
                arrayList1.Add(_Width);
                arrayList2.Add(18);
            }
            if (_ZIndex.get_HasValue())
            {
                arrayList1.Add(_ZIndex);
                arrayList2.Add(19);
            }
            rectangleType.Items = arrayList1.ToArray();
            rectangleType.ItemsElementName = (Rdl.ItemsChoiceType12[])arrayList2.ToArray(typeof(Rdl.ItemsChoiceType12));
            arrayList2 = arrayList1 = null;
            return rectangleType;
        }

    } // class RectangleType

}

